package com.nbot.server.controller;

import com.nbot.server.domain.UserDO;
import com.nbot.server.util.ShiroUtils;
import org.springframework.stereotype.Controller;

/**
 * Created by lovewinner on 2018/6/5.
 */
@Controller
public class BaseController {
    public UserDO getUser() {
        return ShiroUtils.getUser();
    }

    public Long getUserId() {
        return getUser().getUserId();
    }

    public String getUsername() {
        return getUser().getUsername();
    }
}